<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>修改密码</title>
		<link rel="stylesheet" type="text/css" href="btn_class.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/resources/css/ext-all.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/ext-2.2/style.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/ext-2.2/desktop.css" />
		<link rel="stylesheet" type="text/css"
			href="ext-2.2/ext-2.2/ext-patch.css" />

		<script type="text/javascript" src="ext-2.2/adapter/ext/ext-base.js"></script>
		<script type="text/javascript" src="ext-2.2/ext-all.js"></script>
		<script type="text/javascript" src="ext-2.2/gridToExcel.js"></script>

		<!--  	<script type="text/javascript" src="ext-2.2/source/locale/ext-lang-zh_CN.js"></script>   -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

		<script type="text/javascript">
		<%String uId = (String) session.getAttribute("Uid");
			if (uId == null || uId.equals("null")) {%>
			window.parent.location.href = 'index.jsp';
		<%}%>
		
		window.onload = function(){
			if("<%=request.getAttribute("flag")%>"=="N")
			{
				alert("原始密码不正确！");
			}
			if("<%=request.getAttribute("flag")%>"=="Y")
			{
				alert("密码修改成功！");
			}
		}
		
		function changePass()
		{
			var Upassword = document.getElementById("Upassword").value;
			var userPasswordNew = document.getElementById("userPasswordNew").value;
			var userPasswordNew2 = document.getElementById("userPasswordNew2").value;
			if(Upassword==""){
				alert("请输入原始密码");
				return;
			}
			if(userPasswordNew=="" || userPasswordNew2==""){
				alert("请输入新密码");
				return;
			}
			if(userPasswordNew !=userPasswordNew2){
				alert("请保证两次输入密码一致");
				return;
			}
			var f = document.forms["changePassForm"];
			f.action = "user!changeUserPassword.do";
			f.submit();
		}
	</script>
	</head>

	
<body style="background:white"> 
	<div class="x-panel-header x-panel-header-noborder x-unselectable" id="ext-gen8" style="mozuserselect: none; khtmluserselect: none;" unselectable="on">
		<span class="x-panel-header-text" >修改密码</span>
	</div>
		 <form method="post" name="changePassForm" >
		 <table width="100%" border="0" cellSpacing="3" cellPadding="3">
		 	<tr>
		 		<td><font style="font-size:15px">旧的密码：</font><input name="Upassword" id="Upassword" type="password" size="15" maxLength="22"/><font color="#ff0000">*</font></td>
		 	</tr>
		 	<tr>
		 		<td><font style="font-size:15px">新的密码：</font><input name="userPasswordNew" id="userPasswordNew" type="password" size="15" maxLength="22"/><font color="#ff0000">*</font></td>
		 	</tr>
		 	<tr>
		 		<td><font style="font-size:15px">重复密码：</font><input name="userPasswordNew2" id="userPasswordNew2" type="password" size="15" maxLength="22"/><font color="#ff0000">*</font></td>
		 	</tr>
		 	<tr>
		 		<td ><input  type="button" class="submit_btn"  onclick="changePass()" value="修改密码" /></td>
		 	</tr>
		 	
		 </table>
		  
           </form>
		
    </body> 
</html>
